"use strict";
Component({
    properties: {
        mes: Object
    },
    data: {
        state: '取消付款', money: 123.01, num: 2, discount: 23.00, sta: 0, name: ''
    },
    attached: function () {
        var mes = this.data.mes;
        var a;
        switch (mes.state) {
            case 0:
                a = '买家未付款';
                break;
            case 1:
                a = '卖家已发货';
                break;
            case 2:
                a = '交易成功';
                break;
            case 3:
                a = '正在申请售后';
                break;
            case 4:
                a = '取消付款';
                break;
            case 5:
                a = '商家处理中';
                break;
            case 6:
                a = '交易成功';
                break;
            default: a = '交易成功';
        }
        this.setData({
            money: mes.money,
            sta: mes.state,
            state: a,
            name: mes.name,
            num: mes.num
        });
        console.log('展示', mes.state);
    },
    methods: {}
});
